/*
 * @description:
 * @version: 1.0.1
 * @Author: xuqiulin
 * @Date: 2021-05-01 10:44:53
 * @LastEditors:
 * @LastEditTime: 2021-05-01 15:33:13
 */
package controllers

import (
	"github.com/gin-gonic/gin"
	"github.com/globalsign/mgo/bson"
)

type AdCntLog struct {
	Id     int64            `bson:"_id" json:"_id"`
	Advert map[string]int64 `bson:"advert" json:"advert"`
}

func GetAdCntList(c *gin.Context) {
	var adCntLog AdCntLog
	err := GameLogDB.FindOne("AdCntLog", bson.M{"_id": 1}, nil, &adCntLog)
	if err != nil {
		handleErr(c, 404, err.Error())
		return
	}
	handleOk(c, map[string]interface{}{"log": adCntLog})
}
